import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/home/home.vue'
// import TabBar from '@/components/TabBar.vue'
import TabBar from '../components/TabBar.vue'
const routes = [
  {
    path: '/',
    name: 'home',
    components:
    {
      default:HomeView,
      footer:TabBar
    } 
  },
  {
    path: '/login',
    name: 'login',
    component: () => import( '../views/login/login.vue')
  },
  {
    path: '/kind',
    name: 'kind',
    components:{
      default:() => import( '../views/kind/kind.vue'),
      footer:TabBar
    }
     
  },
  {
    path: '/qiang',
    name: 'qiang',
    components:{
      default:() => import( '../views/qiang/qiang.vue'),
      footer:TabBar
    }
  },
  {
    path: '/shop',
    name: 'shop',
    components:{
      default:() => import( '../views/shop/shop.vue'),
      footer:TabBar
    }
  },
  {
    path: '/wo',
    name: 'wo',
    components:{
      default:() => import( '../views/wo/wo.vue'),
      footer:TabBar
    }
  },
  {
    path: '/detail/:id',
    name: 'detail',
    component: () => import( '../views/detail/detail.vue')
  },
  {
    path: '/fu',
    name: 'fu',
    components:{
      default:() => import( '../views/fu/fu.vue'),
      footer:TabBar
    }
  },
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
